home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Mops 2.7 / Mops Manual / Part II.srd / Part II.srd.rsrc / PICT_39.png < prev    next >
Portable Network Graphic  |  1996-01-02  |  137KB  |  816x1056  |  8-bit (256 colors)
Labels: book | bulletin board | person | poster | reckoner | sky | windowpane
OCR: Calling the Toolbox Because Mops' data stack is the Macintosh system stack calling stack -based Toolbox routines fairly easy You should read the Inside Macintosh section on Using QuickDraw from Assembly Language to understand how Toolbox routines use the stack, but we will give you brief overv iew here Toolbox data cells Toolbox routines expect parameters of two types on the stack: 16-bit and 32-bit. Since all Mops parameters are 32 -bit, you might occasionally have to convert Mops cell to a 16-bit Toolbox cell. As we saw earlier, both Mops stacks grow towards low memory Moreover the stack pointer always points to the high-order word (a word is 16 bits) of the top 32-bit element. To convert 32 -bit value to a 16-bit value, we need only apd to the stack pointer, which will advance . the low ...